package com.douziit.meilianoa.base.response;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;

/**
 * @author MrShun
 * @version 1.0
 * @Date 2017/12/9
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ResponseData<T> implements Serializable{

    /**
     * 执行状态
     */
    private Integer code;

    /**
     * 消息描述
     */
    private String message;

    /**
     * 数据对象
     */
    private T data;

    /**
     * 执行时间
     */
    private String time;

    /**
     * 异常消息
     */
    private String exception;

    /**
     * 当前页数
     */
    private Integer index;

    /**
     * 每页大小
     */
    private Integer size;

    /**
     * 总记录数
     */
    private Long total;

    /**
     * 总页数
     */
    private Integer pages;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getPages() {
        return pages;
    }

    public void setPages(Integer pages) {
        this.pages = pages;
    }
}
